package com.cszjzx.member.service;

import java.io.IOException;
import java.sql.SQLException;

import com.cszjzx.member.dao.MembercodeDAO;
import com.cszjzx.member.dao.MembercodeDAOImpl;

public class MembercodeServiceImpl implements MembercodeService {
	private MembercodeDAO membercodeDao = null;
	public MembercodeServiceImpl(){
		try {
			membercodeDao = new MembercodeDAOImpl();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public String[] getStartAndStop() {
		try {
			return membercodeDao.getStartAndStop();
		} catch (ClassNotFoundException | SQLException | IOException e) {
			e.printStackTrace();
			return null;
		}
	}
	
	public void updateStartAndStop(String start,String stop){
		try {
			membercodeDao.update(start, stop);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

}
